Skip to content

[WAYP-3244] Switch to new Waypoint API version#1208

Merged
HenryEstberg merged 4 commits intomainfrom
wayp-3244-new-api-endpoints
Feb 21, 2025
Merged

[WAYP-3244] Switch to new Waypoint API version#1208
HenryEstberg merged 4 commits intomainfrom
wayp-3244-new-api-endpoints

Conversation

@HenryEstberg
Copy link
Contributor

@HenryEstberg HenryEstberg commented Feb 7, 2025

🛠️ Description

Waypoint API calls are now all made to the new 20241122 version of the API.

In addition, the CreatedBy resource is now marked as deprecated so that it can be completely removed in a future update to the Waypoint provider.

🏗️ Acceptance tests

  • Are there any feature flags that are required to use this functionality?
  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccWaypoint'

=== RUN   TestAccWaypointData_Add_On_Definition_basic
--- PASS: TestAccWaypointData_Add_On_Definition_basic (19.93s)
=== RUN   TestAccWaypointData_Add_On_basic
--- PASS: TestAccWaypointData_Add_On_basic (22.11s)
=== RUN   TestAccWaypoint_AddOn_DataSource_WithInputVars
--- PASS: TestAccWaypoint_AddOn_DataSource_WithInputVars (22.78s)
=== RUN   TestAccWaypoint_Application_DataSource_basic
--- PASS: TestAccWaypoint_Application_DataSource_basic (19.26s)
=== RUN   TestAccWaypoint_Application_DataSource_WithInputVars
--- PASS: TestAccWaypoint_Application_DataSource_WithInputVars (17.72s)
=== RUN   TestAccWaypointData_Template_basic
--- PASS: TestAccWaypointData_Template_basic (16.67s)
=== RUN   TestAccWaypointData_template_with_variable_options
--- PASS: TestAccWaypointData_template_with_variable_options (11.84s)
=== RUN   TestAccWaypoint_Action_basic
    resource_waypoint_action_test.go:25: Waypoint Action tests skipped unless env 'HCP_WAYP_ACTION_TEST' set
--- SKIP: TestAccWaypoint_Action_basic (0.00s)
=== RUN   TestAccWaypoint_Add_On_Definition_basic
--- PASS: TestAccWaypoint_Add_On_Definition_basic (13.64s)
=== RUN   TestAccWaypoint_Add_On_basic
--- PASS: TestAccWaypoint_Add_On_basic (13.58s)
=== RUN   TestAccWaypoint_AddOnInputVariables
--- PASS: TestAccWaypoint_AddOnInputVariables (13.01s)
=== RUN   TestAccWaypoint_AddOnInputVariables_OnDefinition
--- PASS: TestAccWaypoint_AddOnInputVariables_OnDefinition (14.23s)
=== RUN   TestAccWaypoint_Application_basic
--- PASS: TestAccWaypoint_Application_basic (10.20s)
=== RUN   TestAccWaypoint_ApplicationInputVariables
--- PASS: TestAccWaypoint_ApplicationInputVariables (11.33s)
=== RUN   TestAccWaypoint_ApplicationInputVariables_OnTemplate
--- PASS: TestAccWaypoint_ApplicationInputVariables_OnTemplate (10.87s)
=== RUN   TestAccWaypoint_Template_basic
--- PASS: TestAccWaypoint_Template_basic (14.42s)
=== RUN   TestAccWaypoint_template_with_variable_options
--- PASS: TestAccWaypoint_template_with_variable_options (8.73s)
...

@HenryEstberg HenryEstberg requested review from a team as code owners February 7, 2025 23:55
@HenryEstberg HenryEstberg changed the title [WAYP-3244] Switch dependency to new API version [WAYP-3244] Switch Waypoint dependency to new API version Feb 8, 2025
@HenryEstberg HenryEstberg changed the title [WAYP-3244] Switch Waypoint dependency to new API version [WAYP-3244] Switch to new Waypoint API version Feb 8, 2025
@pierluc-codes
Copy link
Contributor

@hanshasselberg can you get a review from your team please?

@HenryEstberg HenryEstberg force-pushed the wayp-3244-new-api-endpoints branch from 97f2095 to 0900ebe Compare February 11, 2025 00:55
Copy link
Contributor

@paladin-devops paladin-devops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! My requested changes are only for removing the _v2 suffix on the package alias since it's not necessary.


cloud_waypoint "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/client"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service"
cloud_waypoint_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/client"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can still remain as cloud_waypoint; in the event that multiple versions need to be supported here simultaneously, we should probably suffix the date to be consistent with how they're versioned.


sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/models"
waypoint_models_v2 "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2024-11-22/models"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this _v2 suffix for models is not needed either.

Computed: true,
Description: "The user who created the Add-on.",
Computed: true,
DeprecationMessage: "This attribute is deprecated and will be removed in a future version of the provider.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@HenryEstberg HenryEstberg force-pushed the wayp-3244-new-api-endpoints branch 2 times, most recently from 38cec3c to 8906e2c Compare February 20, 2025 00:33
paladin-devops
paladin-devops previously approved these changes Feb 20, 2025
@HenryEstberg
Copy link
Contributor Author

@hanshasselberg can you get a review from your team please?

This PR is in a good state to merge, I would appreciate a review from your team! Thank you!

hanshasselberg
hanshasselberg previously approved these changes Feb 21, 2025
Copy link
Member

@hanshasselberg hanshasselberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hanshasselberg
Copy link
Member

@HenryEstberg I am not in the github team that you need reviewing from.

@HenryEstberg HenryEstberg merged commit fb05ce5 into main Feb 21, 2025
8 checks passed
@HenryEstberg HenryEstberg deleted the wayp-3244-new-api-endpoints branch February 21, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants